/** When your routing table is too long, you can split it into small modules**/
import pageComponentName from '@/config/page-component-name'
import Layout from '@/layout/index.vue'

const netRouter = [
  {
    path: '/net',
    component: Layout,
    name: 'net',
    meta: {
      title: '服务区域',
      icon: 'MapLocation',
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/network/list/index.vue'),
        name: 'netList',
        meta: {
          title: '服务区域',
          icon: 'MapLocation',
          keepAlive: true,
          componentName: pageComponentName.network.networkList,
        },
      },
      {
        path: 'new',
        component: () => import('@/views/network/new/index.vue'),
        name: 'newNet',
        meta: {
          title: '新增服务商',
          keepAlive: true,
          componentName: pageComponentName.network.networkForm,
        },
        hidden: true,
      },
      {
        path: 'editDetails/:id',
        component: () => import('@/views/network/new/index.vue'),
        name: 'editDetails',
        meta: {
          title: '编辑服务商',
          keepAlive: true,
          componentName: pageComponentName.network.networkForm,
        },
        hidden: true,
      },
      // 跳转页面
      {
        path: 'netdetail/:id',
        component: () => import('@/views/network/list/netdetail/index.vue'),
        name: 'netDetail',
        meta: {
          title: '服务商详情',
          keepAlive: true,
          componentName: pageComponentName.network.networkDetail,
        },
        hidden: true,
      },
      //服务人员
      {
        path: 'empList',
        component: () => import('@/views/network/emp/list/index.vue'),
        name: 'empList',
        meta: {
          title: '服务人员',
          icon: 'MapLocation',
          keepAlive: true,
          componentName: pageComponentName.network.networkEmpList,
        },
      },
      {
        path: 'empExcelImport',
        component: () => import('@/views/excel/index.vue'),
        name: 'empExcelImport',
        meta: {
          title: '工程师资料导入',
          keepAlive: true,
          componentName: pageComponentName.common.import,
        },
        hidden: true,
      },
      {
        path: 'networkImport',
        component: () => import('@/views/excel/index.vue'),
        name: 'networkImport',
        meta: {
          title: '服务商资料导入',
          keepAlive: true,
          componentName: pageComponentName.common.import,
        },
        hidden: true,
      },
    ],
  },
]

export default netRouter
